# BLOCK 1 (naming x.1)

## Swh0.1 L2 --------------------

end
en
conf t

no vlan 2
vlan 21
name vlan21

no vlan 3
vlan 31
name vlan31

int fa0/1
switchport mode access 
switchport access vlan 21

int fa0/2
switchport mode access 
switchport access vlan 31

int fa0/3
switchport mode access 
switchport access vlan 21

int fa0/4
switchport mode access 
switchport access vlan 31

int gi0/1
switchport mode trunk
switchport trunk allowed vlan 21,31
end

wr mem

## Swh1.1 L2 --------------------


en
conf t

no vlan 2
vlan 21
name vlan21

no vlan 3
vlan 31
name vlan31

int fa0/1
switchport mode access 
switchport access vlan 21

int fa0/2
switchport mode access 
switchport access vlan 31

int fa0/3
switchport mode access 
switchport access vlan 21

int fa0/4
switchport mode access 
switchport access vlan 31

int gi0/1
switchport mode trunk
switchport trunk allowed vlan 21,31
end

wr mem

## MSwh0.1 L3 --------------------

en
conf t

ip routing

no vlan 2
vlan 21
name vlan21
exit

no vlan 3
vlan 31
name vlan31
exit
no vlan 4
vlan 41
name vlan41
exit
int fa0/1
switchport trunk encapsulation dot1q 
switchport mode trunk
switchport trunk allowed vlan 21,31
exit

int fa0/2
switchport trunk encapsulation dot1q 
switchport mode trunk
switchport trunk allowed vlan 21,31
exit

int gi0/1
switchport mode access 
switchport access vlan 41
exit

int vlan21
ip address 192.168.21.1 255.255.255.0
no shutdown
exit

int vlan31
ip address 192.168.31.1 255.255.255.0
no shutdow
exit

int vlan41
ip address 192.168.41.2 255.255.255.0
no shutdown
exit

end

wr mem

## PC

Pc0.1::fa0<->Swh0.1::fa0/1
Pc1.1::fa0<->Swh0.1::fa0/2
Pc2.1::fa0<->Swh0.1::fa0/3
Pc3.1::fa0<->Swh0.1::fa0/4

### ip vlan2 192.168.21.1, ip vlan3 192.168.31.1 at Swh0 L3

Pc0.1::: ip address 192.168.21.2 255.255.255.0 gataway 192.168.21.1
Pc1.1::: ip address 192.168.31.2 255.255.255.0 gataway 192.168.31.1
Pc2.1::: ip address 192.168.21.3 255.255.255.0 gataway 192.168.21.1
Pc3.1::: ip address 192.168.31.3 255.255.255.0 gataway 192.168.31.1

### ping 
Pc0.1 ping 192.168.31.4
        +

Pc4.1::fa0<->L2::fa0/1
Pc5.1::fa0<->L2::fa0/2
Pc6.1::fa0<->L2::fa0/3
Pc7.1::fa0<->L2::fa0/4


### ip vlan2 192.168.21.1, ip vlan3 192.168.31.1 at Swh0 L3

Pc4.1::: ip address 192.168.21.4 255.255.255.0 gataway 192.168.21.1
Pc5.1::: ip address 192.168.31.4 255.255.255.0 gataway 192.168.31.1
Pc6.1::: ip address 192.168.21.5 255.255.255.0 gataway 192.168.21.1
Pc7.1::: ip address 192.168.31.5 255.255.255.0 gataway 192.168.31.1


## Rut0.1 192.168.41.1
            +
en
conf t

int gi0/0
no shutdown
ip address 192.168.41.1 255.255.255.0
end

### ping 
Rut0.1 ping 192.168.41.2
        +
       ping 192.168.22.2
        -







# BLOCK 2

## Swh0.2 L2 --------------------

end
en
conf t

no vlan 2
vlan 22
name vlan22

no vlan 3
vlan 32
name vlan32

int fa0/1
switchport mode access 
switchport access vlan 22

int fa0/2
switchport mode access 
switchport access vlan 32

int fa0/3
switchport mode access 
switchport access vlan 22

int fa0/4
switchport mode access 
switchport access vlan 32

int gi0/1
switchport mode trunk
switchport trunk allowed vlan 22,32
end

wr mem

## PC

Pc0.2::fa0<->Swh0.2::fa0/1
Pc1.2::fa0<->Swh0.2::fa0/2
Pc2.2::fa0<->Swh0.2::fa0/3
Pc3.2::fa0<->Swh0.2::fa0/4

### ping 
Pc0.1+Pc2.1
Pc0.1-Pc1.1

## Rut0.2

en
conf t

int gi0/0
no shutdown
exit
int gi0/0.2
encapsulation dot1Q  22
ip address 192.168.22.1 255.255.255.0
no shutdown
exit
int gi0/0.3
encapsulation dot1Q  32
ip address 192.168.32.1 255.255.255.0
no shutdown
 
end

wr mem

## PC

Pc0.1::: ip address 192.168.22.2 255.255.255.0 gataway 192.168.22.1
Pc1.1::: ip address 192.168.32.2 255.255.255.0 gataway 192.168.32.1
Pc2.1::: ip address 192.168.22.3 255.255.255.0 gataway 192.168.22.1
Pc3.1::: ip address 192.168.32.3 255.255.255.0 gataway 192.168.32.1